<template>
  <div class="user-profile">
    <el-form-item label="用户名">
      <el-input v-model="username" disabled />
    </el-form-item>
    <el-form-item label="头像">
      <el-avatar :src="avatar || defaultAvatar" size="large" />
    </el-form-item>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { defaultAvatar } from '@/assets/defaultAvatar';

const username = ref('');
const avatar = ref('');
</script>

<style scoped>
.user-profile {
  text-align: left;
}
</style> 